﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace msBsc.WebUi.wMall.Public
{
    public partial class wfModifyAgentDjackPwd : msBsc.Cls.BPProxyDealer
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public override void DoAction()
        {
            if (strAction == "doChangePassword")
            {
                string userPwd = this.GetParamHtValue("password");

                if (string.IsNullOrWhiteSpace(userPwd))
                {
                    this.Alert("密码不能为空");
                    return;
                }


                if (userPwd.Trim().Length < 6 || userPwd.Trim().Length > 16)
                {
                    this.Alert("密码长度只能在6~16为之间!");
                    return;
                }

                using (msBsc.AppLogic.DataAlc.CBizCustomerRegister objCBizCustomerRegister = new AppLogic.DataAlc.CBizCustomerRegister())
                {
                    string[] result = objCBizCustomerRegister.ModifyAgentDjackPwd(userPwd);

                    this.Alert(result[1]);

                    if (result[0] == "True")
                    {
                        this.ExecJScript("$.setLoginOut();");
                    }
                }
            }
        }
    }
}